import request from '@/utils/request';
import { adminUrl } from "@/utils/baseUrl.js";

// 创建学生评价
export function createEvaluation(data) {
  debugger
  return request({
    url: adminUrl + '/study/evaluation/create',
    method: 'post',
    data: data
  })
}

// 更新学生评价
export function updateEvaluation(data) {
  return request({
    url: adminUrl + '/study/evaluation/update',
    method: 'put',
    data: data
  })
}

// 删除学生评价
export function deleteEvaluation(id) {
  return request({
    url: adminUrl + '/study/evaluation/delete?id=' + id,
    method: 'delete'
  })
}

// 获得学生评价
export function getEvaluation(id) {
  return request({
    url: adminUrl + '/study/evaluation/get?id=' + id,
    method: 'get'
  })
}

// 获得学生评价分页
export function getEvaluationPage(query) {
  return request({
    url: adminUrl + '/study/evaluation/page',
    method: 'get',
    params: query
  })
}

// 获得学生评价列表
export function searchEvaluation(query) {
  return request({
    url: adminUrl + '/study/evaluation/list',
    method: 'get',
    params: query
  })
}

// 导出学生评价 Excel
export function exportEvaluationExcel(query) {
  return request({
    url: adminUrl + '/study/evaluation/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
